/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author user
 */
@Entity
@Table(name = "pos_transaction_out_request_to_mk_detail")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "PosTransactionOutRequestToMkDetail.findAll", query = "SELECT p FROM PosTransactionOutRequestToMkDetail p"),
//    @NamedQuery(name = "PosTransactionOutRequestToMkDetail.findBySync", query = "SELECT p FROM PosTransactionOutRequestToMkDetail p WHERE p.sync = :sync"),
//    @NamedQuery(name = "PosTransactionOutRequestToMkDetail.findByRequestDetailId", query = "SELECT p FROM PosTransactionOutRequestToMkDetail p WHERE p.requestDetailId = :requestDetailId"),
//    @NamedQuery(name = "PosTransactionOutRequestToMkDetail.findByRequestDetailQuantity", query = "SELECT p FROM PosTransactionOutRequestToMkDetail p WHERE p.requestDetailQuantity = :requestDetailQuantity"),
//    @NamedQuery(name = "PosTransactionOutRequestToMkDetail.findByRequestDetailPrice", query = "SELECT p FROM PosTransactionOutRequestToMkDetail p WHERE p.requestDetailPrice = :requestDetailPrice")})
public class PosTransactionOutRequestToMkDetail implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "request_detail_id")
    private Integer requestDetailId;
    @Column(name = "request_detail_quantity")
    private BigDecimal requestDetailQuantity;
    @Column(name = "request_detail_price")
    private BigDecimal requestDetailPrice;
    @Lob
    @Column(name = "request_detail_description")
    private String requestDetailDescription;
    @JoinColumn(name = "request_detail_request_id", referencedColumnName = "request_id")
    @ManyToOne
    private PosTransactionOutRequestToMainkitchen requestDetailRequestId;
    @JoinColumn(name = "request_detail_item_id", referencedColumnName = "item_id")
    @ManyToOne
    private PosMasterItem requestDetailItemId;

    public PosTransactionOutRequestToMkDetail() {
    }

    public PosTransactionOutRequestToMkDetail(Integer requestDetailId) {
        this.requestDetailId = requestDetailId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getRequestDetailId() {
        return requestDetailId;
    }

    public void setRequestDetailId(Integer requestDetailId) {
        this.requestDetailId = requestDetailId;
    }

    public BigDecimal getRequestDetailQuantity() {
        return requestDetailQuantity;
    }

    public void setRequestDetailQuantity(BigDecimal requestDetailQuantity) {
        this.requestDetailQuantity = requestDetailQuantity;
    }

    public BigDecimal getRequestDetailPrice() {
        return requestDetailPrice;
    }

    public void setRequestDetailPrice(BigDecimal requestDetailPrice) {
        this.requestDetailPrice = requestDetailPrice;
    }

    public PosMasterItem getRequestDetailItemId() {
        return requestDetailItemId;
    }

    public void setRequestDetailItemId(PosMasterItem requestDetailItemId) {
        this.requestDetailItemId = requestDetailItemId;
    }

    

    public String getRequestDetailDescription() {
        return requestDetailDescription;
    }

    public void setRequestDetailDescription(String requestDetailDescription) {
        this.requestDetailDescription = requestDetailDescription;
    }

    public PosTransactionOutRequestToMainkitchen getRequestDetailRequestId() {
        return requestDetailRequestId;
    }

    public void setRequestDetailRequestId(PosTransactionOutRequestToMainkitchen requestDetailRequestId) {
        this.requestDetailRequestId = requestDetailRequestId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (requestDetailId != null ? requestDetailId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PosTransactionOutRequestToMkDetail)) {
            return false;
        }
        PosTransactionOutRequestToMkDetail other = (PosTransactionOutRequestToMkDetail) object;
        if ((this.requestDetailId == null && other.requestDetailId != null) || (this.requestDetailId != null && !this.requestDetailId.equals(other.requestDetailId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ronsicecream.pos.entities.PosTransactionOutRequestToMkDetail[ requestDetailId=" + requestDetailId + " ]";
    }
    
}
